package com.yue.ssa.exception;

import com.yue.ssa.bean.RespBean;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalException {

    @ExceptionHandler(MyException.class)
    public RespBean myExceptionHandler(MyException e) {
        return RespBean.error(e.getMessage());
    }
}
